/* **********************************************************
 * Copyright 2010 Dimitar Vangelovski
 *
 * This file is part of the Gens3 3D Engine.
 *
 * The Gens3 3D Engine is free software; you can redistribute it and/or
 * modify it under the terms of version 2 of the GNU General Public
 * License as published by the Free Software Foundation.
 *
 * The Gens3 3D Engine is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 * General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with the Gens3 3D Engine; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301, USA
 * **********************************************************/


#pragma once

class CScene;

class CImageGL
{
public:
	CImageGL();
	~CImageGL();

public:
	void			LoadTGA(const char * cFilename);

	int			GetChannels() const	{ return m_iChannels; }
	int			GetWidth() const	{ return m_iWidth; }
	int			GetHeight()	const	{ return m_iHeight; }
	unsigned char * 	GetImageBuf() const	{ return m_pImageBuf; }

	void			SetChannels(int iChannels)		{ m_iChannels = iChannels; }
	void			SetWidth(int iWidth)			{ m_iWidth = iWidth; }
	void			SetHeight(int iHeight)			{ m_iHeight = iHeight; }
	void			SetImageBuf(unsigned char * pBuf)	{ m_pImageBuf = pBuf; }

	void		CreateTexture(unsigned int textureArray[], const char * strFileName, int iTextureID, bool &bHasAlpha);
	bool		LoadGLTextures(CScene * pScene);

private:
	int			m_iChannels;
	int			m_iWidth;
	int			m_iHeight;
	unsigned char *		m_pImageBuf;
};

